<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var findWords = function(words) {
			    const f = new Set("qwertyuiop".split('')),
			    s = new Set("asdfghjkl".split('')),
			    t = new Set("zxcvbnm".split(''))
			    const singleCheck = (w, set) => w.split('').every(v => set.has(v.toLocaleLowerCase()))
			    const check = (w) => {
			        return singleCheck(w, f) || singleCheck(w, s) || singleCheck(w, t)
			    }
			    return words.filter(w => check(w))
			};
			console.log(findWords(["Hello","Alaska","Dad","Peace"]));
		</script>
	</body>
</html>
